package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-06-06
 * Time: 22:26
 */
//默认是继承了父类Object
class Demo /*extends Object*/{

}
public class Test1 {
    public static void main(String[] args) {
        Demo demo = new Demo();//实例化一个对象
        System.out.println("不加toString方法:"+demo);
        System.out.println("加toString方法:"+demo.toString());
    }
}
